/*
 * Copyright (C) 2011, EADS France
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 */
package xowl.interpreter.backends.rete;

import xowl.interpreter.backends.rdf.RDFTripleField;
import xowl.interpreter.backends.rdf.XOWLVariableNode;

/**
 *
 * @author Laurent WOUTERS
 */
public class Binder {
    private XOWLVariableNode variable;
    private RDFTripleField field;
    
    public Binder(XOWLVariableNode variable, RDFTripleField field) {
        this.variable = variable;
        this.field = field;
    }
    
    public void execute(Token token, TripleFact fact) {
        token.bind(variable, fact.getTriple().getField(field));
    }
}
